package com.cloudfun.campusshare.device.protocol.response;

import lombok.Data;

/**
 * Created by Huqin on 2020/2/4
 */
@Data
public class BaseMessage {

    private boolean valid = true;

    private boolean ack;

    private String timestamp;

    public static BaseMessage invalidMessage() {
        BaseMessage message = new BaseMessage();
        message.setValid(false);
        return message;
    }

    public static BaseMessage ackMessage() {
        BaseMessage message = new BaseMessage();
        message.setAck(true);
        return message;
    }

}
